for graphic programs, screen savers, calendars, T-shirts, and all sorts of other colorful products. Figure 10.30 shows four different views of the Mandelbrot set.
While infinitely complex in appearance, the Mandelbrot set is based on a very simple equation:
Zn = Zn12 + C
where the Zn and C are complex numbers.
As a quick review, recall that complex numbers have a real part and an imaginary part. A complex number with real part R and imaginary part I is written as R + I * i, where i is a special number representing the square root of 1. Now if Zn-1 = Rn-1 + In-1 * i and C = RC + IC * i, you can rewrite the equation above as:
Zn = Zn-12 + C
= (Rn-1 + In-1 * i)2 + (RC + IC * i)
= (Rn-12 + 2 * Rn-1 * In-1 * i + In-12 * i2) + (RC + IC * i)
Because i is the square root of 1, i2 = 1 by definition. Then you can regroup the real and imaginary parts of the equation to get: